package pdd2;

import java.util.PriorityQueue;
import java.util.Scanner;

/**
 * Created by lingfengsan on 2018/9/28.
 *
 * @author lingfengsan
 */
class Str0 {
    public double num;

    public String str;
    public Str0(){}
    public Str0(double num, String str) {
        this.num = num;
        this.str = str;
    }

}

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
//        String str0=".1";
//        System.out.println(Double.valueOf(str0));
        System.out.println(max(str));

    }

    private static String max(String str) {
        PriorityQueue<Str0> pq = new PriorityQueue<>((a, b) -> ((b.num - a.num) > 0 ? 1 : -1));
        Str0 max=new Str0(Double.MAX_VALUE,null);
        for (int i = 0; i < str.length(); i++) {
            if (valid(str.charAt(i))) {
                StringBuilder stringBuilder = new StringBuilder();
                StringBuilder stringBuilder1 = new StringBuilder();
                int j = 0;
                boolean dot = false;
                while (i + j < str.length() && valid(str.charAt(i + j))) {
                    if (dot && str.charAt(i + j) != '.') break;
                    stringBuilder.append(str.charAt(i + j));
                    if (dot) {
                        stringBuilder1.append(str.charAt(i + j));
                    }
                    if (str.charAt(i + j) == '.') dot = true;
                    j++;
                }
                i = i + j - 1;
//                if(max.str==null) max=new Str0(Double.valueOf(stringBuilder.toString()), stringBuilder.toString());
                pq.add(new Str0(Double.valueOf(stringBuilder.toString()), stringBuilder.toString()));
//                pq.add(Double.valueOf(stringBuilder.toString()));
//                if (stringBuilder1.length() > 0) pq.add(Double.valueOf(stringBuilder1.toString()));
                if (stringBuilder1.length() > 0) pq.add(new Str0(Double.valueOf(stringBuilder1.toString()), stringBuilder1.toString()));
            }
        }
        return pq.poll().str;
    }

    private static boolean valid(char c) {
        return (c <= '9' && c >= '0') || (c == '.');
    }
}
